package iPaint;

public class SmallRoom extends Node {
	
	public SmallRoom(String tname, float tx, float ty, float tz) {	
		name = tname;
		x = tx;
		y = ty;
		z = tz;
		radius = (float) 1.89 * 40;
		type = 3;
	}
	
	public void setRadius(float tRadius) {
		radius = tRadius;
	}
	
	public String genCode(int i, iPaint ip) {
		String code = "rNode node" + Integer.toString(i) + " = new rNode(\""
		+ name + "\", (float)" + Float.toString(x) + ", (float)"
		+ Float.toString(y) + ", (float)" + Float.toString(z)
				+ ", (float)1.89 * 40, 3);" + "\n" + "graph.addVertex( node"
				+ Integer.toString(i) + ");"+ "\n" +
				" graph.getSubGraph().get(" +
				Integer.toString(ip.z-1) +
				").addVertex( node" +
				Integer.toString(i) +
				" );";		
		return code;
	}
}
